import { request } from '../config.js'

// 字典列表
export const getdictlist = (params) => {
  return request.get({
    url: '/dict/index',
    params
  })
}

// 字典添加
export const getdictadd = (params) => {
  return request.postjson({
    url: '/dict/add',
    data: JSON.stringify(params)
  })
}

// 字典编辑
export const getdictedit = (params) => {
  return request.postjson({
    url: '/dict/update',
    data: JSON.stringify(params)
  })
}


// 字典详情
export const getdictinfo = (params) => {
  return request.get({
    url: '/dict/info/' + params.id
  })
}
// 字典删除
export const getdictdel = (params) => {
  return request.get({
    url: '/dict/delete/' + params.id,
  })
}


// 字典批量删除
export const getdictbatchdelete = (params) => {
  return request.postjson({
    url: '/dict/batch_delete/',
    data: JSON.stringify(params)
  })
}

// 子类数据 列表
export const getdict_datalist = (params) => {
  return request.get({
    url: '/dict/dict_data',
    params
  })
}

// 子类数据 列表添加
export const getdict_data_add = (params) => {
  return request.postjson({
    url: '/dict/dict_data_add',
    data: JSON.stringify(params)
  })
}

// 子类数据 列表编辑
export const getdict_data_update = (params) => {
  return request.postjson({
    url: '/dict/dict_data_update',
    data: JSON.stringify(params)
  })
}

// 子类数据 列表删除
export const getdictdelete_data = (params) => {
  return request.get({
    url: '/dict/delete_data/' + params.id,
  })
}